//this source is written by mark on 2013/10/22
//is to represent the buffer queue to store the packet 
//notice the Linked_queue is different and it's head is always not empty 

#ifndef BUFF_QUEUE_H
#define BUFF_QUEUE_H

#include<stdio.h>
#include"use_hash.h"
#include"log.h"


struct buff_queue_node
{
	unsigned long arrive_time;
	record_key_t key;
	struct buff_queue_node *next;
	char *packet;
	int packet_len;
};

struct buff_queue
{
	struct buff_queue_node *head;
	unsigned long count;
};


extern void buff_queue_init(struct buff_queue * buffer_queue);

extern void buff_queue_add(struct buff_queue * buffer_queue,struct buff_queue_node *node);
extern struct buff_queue_node* buff_queue_del(struct buff_queue * buffer_queue);
extern int buff_queue_count(struct buff_queue *buffer_queue);





#endif


